home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_22_1988_Transactor_Publishing.d64
/
read infocom
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
39 lines
10 rem read infocom
15 rem 1/3/87
20 rem thomas w. gurley
25 rem p.o. box 133
30 rem wills point, texas, 75169
35 :
40 :
100 poke55,0:poke56,42:clr:rem lower top of basic
110 aa=0:ab=0:ac=0:ad=0:m=0:n=0:o=0:nx=0:nn=0:diml(6):rem define variables
120 print" read infocom"
130 print"start ";: input"address";nx
140 print"increment 1 2": inputnn: ifnn<1ornn>2then140
150 ifnx=0thennx=10816:rem start of short quick search word list
160 ifpeek(197)=4thenprint"address is "nx: goto130:rem change address with f1
170 aa=peek(nx):ab=peek(nx+1):ac=peek(nx+2):ad=peek(nx+3)
180 m=0:n=0:o=0
190 rem 95 94 97 96 aa ab ac ad
200 l(1)=int((aa-20)/4)+64:rem the '+64' and '+59' restore alphabet position
210 l(3)=(ab and 31)+59:rem 'and 31' drops top three bits
220 m=int((ab and 240)/32)+59:rem 'and 240' takes top bits only
230 if(aa and 1)=1 then n=8:rem restore carry on second 'rol'
240 if(aa and 2)=2 then o=16:rem restore carry on first 'rol'
250 l(2)=m+n+o:rem add carries back in
260 rem second half
270 m=0:n=0:o=0:rem cancel carries
280 l(4)=int((ac-20)/4)+64
290 l(6)=(ad and 31)+59
300 m=int((ad and 240)/32)+59
310 if(ac and 1)=1 then n=8
320 if)ac and 2)=2 then o=16
330 l(5)=m+n+0
340 print:print nx
350 forx=1to6:a=l(x) and 223:ifa<65ora>90thena=46:rem '.' = invalid character
360 rem the 'and' 223 clears bit 5 to make lower case character
370 l(x)=a:next
380 forx=1to6:printchr$(l(x));:next:print
390 ifpeek(654)=1then390:rem hold with shift lock
400 nx=nx+nn:goto160